1. Field of the Invention
This invention relates to a coding and transmitting system for coding, transmitting and then decoding an image signal.
2. Description of the Related Art
Recently, the technology of moving image signal compression has been remarkably progressed. In addition, LSI and so on to realize this technology have been developed and used in the data base and digital transmission of moving images.
The moving image signal compression technology includes coding techniques such as Huffman coding, motion adaptive coding and discrete cosine transform coding (called DCT). The moving image signal, when compressed, becomes coded data of an indefinite length.
For example, in the Huffman coding, the code of a value occurring at a high probability is converted into a short-value code, so that the amount of data can be reduced. However, a code of a value which is predicted to occur at a low probability depending on the moving image sometimes frequently occurs, changing the amount of data after coding.
In addition, in the motion adaptive coding, the image signal data itself of each field is not coded but the differential image data between fields is coded and transmitted as image data corresponding to a movement. Thus if the image little changes with time, or is almost still, the differential image data between fields is little and the coded data also less occurs. However, as to the moving image, much image data occurs and thus the amount of coded data is greatly changed depending on the situations.
FIG. 1 shows an example of the conventional coding and transmitting system. Referring to FIG. 1, on the transmitter section, an image signal is supplied through an image signal input terminal 101 to a coder 102, where it is converted into coded data 120 of an indefinite length. The coded data is supplied to a transmitter-side buffer (T-buffer) (actually a buffer memory) 104.
The transmitter-side buffer 104 stores only a necessary part of the coded data 120 and then reads it at a constant rate. The read data, 150 is supplied to a transmitter-section side transmitter (T-transmitter) 107, and thereby converted into transmission data of a constant rate, which is transmitted from a transmission data output terminal 108 through a transmission path 116 to the receiver section.
The transmission data transmitted through the transmission path 116 is fed through a transmission data input terminal 109 to a receiver-section side transmitter (R-transmitter) 110. The R-transmitter 110 converts the transmission data back to coded data 151 of a constant rate and then supplies it to a receiver-side buffer (R-buffer) 112, where it is stored at a constant rate. Then, the receiver-side buffer 112 responds to a data request signal from a decoder 114 to supply coded data 152 of an indefinite length to the decoder 114. The decoder 114 decodes the coded data 152 into the image signal of each field and produces it at an image signal output terminal 115.
The transmitter section also has a controller 118T for controlling the timing of the operation of the whole transmitter section. Similarly, the receiver section has a controller 118R for controlling the timing of the operation of the whole receiver section. Each of these controllers generates a start control signal for starting the operation and also a clock signal.
The operation of the conventional coding and transmitting system will be further described with reference to the timing chart of FIG. 2. The coded data of each field in this invention has at the beginning a control code (e.g. STC) which indicates a partition of coded data and which is added by the coder 102. The decoder 114 is controlled by the control code to derive from the buffer 112 the necessary coded data and to decode it into data of each field.
When a moving image signal is transmitted and so on, the period of data occurrence is constant but the amount of data is changed. Thus the image signal fed to the image signal input terminal 101 is converted by the coder 102 into the coded data 120 of an indefinite length which has a different amount of data at each V (every fields) as shown in FIG. 2 at (a). This coded data is supplied to the transmitter-side buffer 104.
The transmitter-side buffer 104 which is formed of an FIFO memory and so on stores a necessary part of the input coded data 120, or only the period in which coded data of an indefinite length occurs.
Then, the T-transmitter 107 reads out at a constant rate the coded data 150 of only the necessary part of coded data from the transmitter-side buffer 104 as shown in FIG. 2 at (b). Then, the T-transmitter 107 converts the coded data 150 of a constant rate into transmission data of a constant rate and sends it through the transmission data output terminal 108 to the transmission path 116.
In this case, it is necessary to monitor the amount of writing data in and reading from the transmitter-side buffer 104 and control the compression rate of the moving image signal, or the amount of generated coded data in order that the buffer 104 can be prevented from overflowing with data upon writing or contrarily supplying insufficient data upon reading.
Thus, since the coded data 150 is read at a constant rate from the transmitter-side buffer 104 when the transmission data is transmitted, the data rate of transmission data per unit time becomes constant. However, before the image signal is coded the field switching point of the image signal occurs at a constant period, and after it is coded and fed through the transmitter-side buffer 104 the switching point occurs at an indefinite period as will be understood from FIG. 2 at (b).
In the receiver section, the transmission data transmitted through the transmission path 116 is converted by the R-transmitter 110 into the coded data 151 of a constant rate. This coded data is fed to the receiver-side buffer 112 where it is temporarily stored at a constant rate. The decoder 114 reads out at the field period the necessary coded data 152 shown in FIG. 2 at (d) from the receiver-side buffer 112 and decodes it. At this time, the amount of coded data read from the receiver-side buffer 112 and fed to the decoder 114 has an indefinite length.
Since each of the buffers in the transmitter and receiver section writes and reads the coded data, a slight time is taken until the image signal is supplied, practically transmitted and decoded. Therefore, if the delay time of the coded data of each field in the transmitter-side buffer 104 is represented by Tn and that in the receiver-side buffer 112 by Xn, the total delay time Tn+Xn is constant in the coding and transmitting system independently of the situation of the image signal.
This aspect will be mentioned below. FIG. 2 is a timing chart of data in which the delay times Tn and Xn in the buffers are both, for example, 3 V period (three fields) (about 50 ms). The coded data a at the first field of the coded data 120 as shown in FIG. 2 at (a) is larger in its amount and so the first coded data a needs much time in being passed through the transmitter-side buffer 104. Therefore, the time in which the successive first and second coded data a and b are passed through the transmitter-side buffer 104 is increased by a time period Ta as shown in FIG. 2 at (b). Then, in the receiver section, the time taken for the coded data c to be fed to the receiver-side buffer 112 is thus delayed by the time period Ta. Consequently, the total delay time of Tn+Ta and Xn-Ta becomes constant Tn+Xn independently of the value of Ta since the lag in the transmitter-side buffer 104 and lead in the receiver-side buffer 112 can be canceled out.
The above description is concerned with the normal state in which no error is mixed into data under transmission. However, an error may occur between the transmitter section and the receiver section, or mixed into the transmission path to change part of the coded data. This case will be considered below.
It is assumed that as shaded in FIG. 2 at (c) an error or the like occurs to change the control code which indicates the partition between the coded data a and b. In this case, when decoding the image signal of coded data a, the decoder 14 of the receiver section reads out unnecessary part of coded data, or not only data a but also data b from the receiver-side buffer 112 by mistake as shown in FIG. 2 at (e).
The coded data c is decoded when the image signal of coded data d must be decoded and thereafter the following image signal is decoded one field out of phase in turn as shown in FIG. 2 at (e). As a result, while the average time in which data is passed through the receiver-side buffer is normally Xn, the pass time for the coded data c and the following is Xn-e, or changed away from the original value.